MobilePay Agreements
The scope of this page is to help you test your integration with our Agreements Engine via MobilePay Subscription.
To find out more details about the agreements functionality on the Altapay platform please check the agreements page. More info about MobilePay can be found here.
For more information about the API endpoints, see API methods for Merchant API.
Initiate the Agreement
You have to initiate the agreement. You can find here more details about createPaymentRequest method.
Remember that the customer will be able to view parameters such as amount, orderLines[0][itemId], orderLines[0][description] and agreement[frequency], agreement[next_charge_date] in the Agreement screen
API method | Scenario | Result | Details |
---|---|---|---|
createPaymentRequest | A recurring agreement is initiated and the customer accepts it. | recurring_confirmed |
|
createPaymentRequest | A recurring agreement is initiated and the customer rejects it. | cancelled |
|
createPaymentRequest | An unscheduled agreement is initiated and the customer accepts it. | recurring_confirmed |
|
createPaymentRequest | An unscheduled agreement is initiated and the customer rejects it. | cancelled |
|
createPaymentRequest | An agreement is initiated and the customer does nothing about it. | cancelled |
|
Simulate the User Action
You can simulate the user action following this link.
You have to provide the agreement id that was returned when initiating the agreement.
Press Accept button to accept the agreement or Reject button to reject the agreement.
For more information about the API endpoints, see API methods for Merchant API.
API Method | Scenario | Result |
---|---|---|
releaseReservation | As a merchant, you're able to release an agreement. In case of an unscheduled agreement, all the charges which are not captured will be automatically released. | Success |
For more information about the API endpoints, see API methods for Merchant API.
API Method | Scenario | Result | Details |
---|---|---|---|
chargeSubscription | As a merchant, you're able to initiate the charge on a recurring agreement. The MobilePay is handling it on its side. The processing time is expected to be 2 days, and MobilePay will call us back with the result of the payment. | Open | transaction_info[description]: Description of the charge |
refundCapturedReservation | As a merchant, you're able to refund a recurring charge. Partial refunds are supported as well. | Success |
For more information about the API endpoints, see API methods for Merchant API.
API Methods | Scenario | Result | Details |
---|---|---|---|
reserveSubscriptionCharge | As a merchant, you're able to initiate an unscheduled charge as a CIT. The user action needs to2 accept/reject the payment. | Open |
agreement[unscheduled_type]:
|
reserveSubscriptionCharge | As a merchant, you're able to initiate an unscheduled charge as a MIT. There is no need to simulate any user action. However, this method requires you to have it enabled by contacting support. | Open |
agreement[unscheduled_type]:
|
captureReservation | As a merchant, you're able to capture an unscheduled charge in 7 days after the approval. You can only capture the exact amount that was reserved in the previous step. Partial captures are not supported for unscheduled charges. |
Success | |
releaseReservation | As a merchant, you're able to release an unscheduled charge. | Success | |
refundCapturedReservation | As a merchant, you're able to refund an unscheduled charge. Partial refunds are supported as well. | Success |
Simulate the User Action
You can simulate the user action following this link.
You have to provide the agreement and the one-off payment ids.
Press Accept button to accept the one-off payment or Reject button to reject the one-off payment.
curl -L -X POST 'https://testgateway.pensio.com/merchant.php/API/createPaymentRequest' \ -H 'Authorization: {{YOUR_AUTH}}' \ -H 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'terminal={{YOUR_TERMINAL_NAME}}' \ --data-urlencode 'amount=40' \ --data-urlencode 'currency=DKK' \ --data-urlencode 'type=subscription' \ --data-urlencode 'shop_orderid=anyOrderId123' \ --data-urlencode 'payment_source=eCommerce' \ --data-urlencode 'agreement[type]=recurring' \ --data-urlencode 'customer_info[customer_phone]=+4557373259' \ --data-urlencode 'orderLines[0][itemId]=1234' \ --data-urlencode 'orderLines[0][description]=The customer will see this description' \ --data-urlencode 'orderLines[0][quantity]=1' \ --data-urlencode 'orderLines[0][goodsType]=subscription_model' \ --data-urlencode 'orderLines[0][unitPrice]=40.00' \ --data-urlencode 'orderLines[0][taxAmount]=10.00' \ --data-urlencode 'orderLines[0][taxPercent]=25.00'